package com.solocredit.finance.ui.main.impl

import com.solocredit.finance.config.MullaConfigs
import com.solocredit.finance.http.ApiService
import com.solocredit.finance.http.ApiService.addCommonParams
import com.solocredit.finance.http.ApiService.addRandomParams
import com.solocredit.finance.http.HttpHelper
import com.solocredit.finance.http.IHttpCallback
import com.solocredit.finance.utils.helper.SharedHelper
import org.json.JSONObject

/**
 * MullaFlow
 * @Author wwdeng
 * @CreateTime: 2024/7/25 13:39
 * @Annotation：Model层  接口实现类
 */
class MullaHomeModelImpl{

    /**
     * 复制主产品信息到子产品
     */
    fun onMullaCopyMainProductToChildProductAction(targetProduct: String,callBack: IHttpCallback){
        val params = JSONObject()
            .addCommonParams()
            .addRandomParams()
            .apply {
                put("sourceProduct", MullaConfigs.MULLA_APPNAME)
                put("targetProduct", targetProduct)
            }
        val httpUrl = ApiService.getHttpUrl(ApiService.API_PATH.MULLA_API_LOAN_PRODUCT_COPY_PATH)
        HttpHelper.postMullaAction(httpUrl,params,callBack)
    }

}